import com.example.demo.chap2.Demo;
import jakarta.ws.rs.core.Application;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test {

        String cname;
        int cid;
        test(){}
        /**
        * 使用setter注入简单值
        */
        @Test
        void testSetter01() {
                ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext-chapter02.xml");
                Customer customer03 = applicationContext.getBean("customer03", Customer.class);
                customer03.display();
                Customer customer04 = applicationContext.getBean("customer04", Customer.class);
                customer04.display();
                }
}
